<template>
    <div class="tool-list">
        <p>工具</p>
        <el-button type="primary" @click="handleClick(toolType.CLEAR)">清空</el-button>
        <el-button type="primary" @click="handleClick(toolType.DRAW_POINT)">画点</el-button>
        <el-button type="primary" @click="handleClick(toolType.DRAW_POLYLINE)">画线</el-button>
        <el-button type="primary" @click="handleClick(toolType.DRAW_POLYGON)">画面</el-button>
        <el-button type="primary" @click="handleClick(toolType.FULL_EXTENT)">还原</el-button>
        <el-button type="primary" @click="handleClick(toolType.SEARCH_DIKUAI)">查询地块</el-button>
        <el-button type="primary" @click="handleClick(toolType.SHOW_HIDE_BASE_MAP)">隐藏/显示底图</el-button>
        <el-button type="primary" @click="handleClick(toolType.SHOW_HIDE_DIKUAI)">隐藏/显示地块</el-button>
        <el-button type="primary" @click="handleClick(toolType.SHOW_HIDE_SHESHI)">隐藏/显示设施</el-button>
        <el-button type="primary" @click="handleClick(toolType.SHOW_HIDE_RESULT)">隐藏/显示结果</el-button>
    </div>
</template>

<script>
import config from '../api/config'

export default {
    data() {
        return {
            toolType: config.toolType
        }
    },
    methods: {
        handleClick(type) {
            this.$store.commit("setToolType", type)
        }
    }
}
</script>

<style lang="less">
    .tool-list{
        text-align: center;
        button {
            display: block !important;
            margin: 10px auto !important;
        }
    }
</style>
